package com.bss.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.andy.basics.Dao;
import com.bss.dao.AttendentDao;
import com.bss.model.Attendent;
import com.bss.model.Patient;

@Service
@Scope("session")
public class AttendentService extends com.andy.basics.Service<Attendent> {

	@Autowired
	private AttendentDao attendentDao;

	@Override
	public Dao<Attendent> getDao() {
		return this.attendentDao;
	}

	public List<Attendent> findAllAttendents(final Patient patient) {
		return this.attendentDao.findAllForPatient(patient, "name is not null");
	}
}
